<template>
  <div class="main">
    <div class="body">
      <div class="body-left">
        <div class="card">
          <div class="card-img" >
            <img  style="margin-top: 30px;margin-left: 30px;width: 300px;height: auto" src="https://www.tcu.edu.cn/images/logo2.png">
            <div class="card-money">
              金额：{{award.money}}元/人次
              <div class="card-standard">
                标准：前{{award.standard}}
              </div>
            </div>
          </div>
          <div class="card-details">
            <div class="card-title">
              {{award.title}}
            </div>
            <div class="card-text">
              {{award.explain}}
            </div>
          </div>
        </div>
        <el-descriptions :column="3" border>
          <el-descriptions-item
              label="奖项名称"
              label-align="center"
              align="center"
              width="110px">
            {{award.title}}
          </el-descriptions-item>
          <el-descriptions-item label="关联教师" label-align="center" align="center" width="110px">{{award.username}}</el-descriptions-item>
          <el-descriptions-item label="联系电话" label-align="center" align="center" width="110px">{{award.phone}}</el-descriptions-item>
          <el-descriptions-item label="联系邮箱" label-align="center" align="center" width="110px">{{award.email}}</el-descriptions-item>
          <el-descriptions-item label="截止时间" label-align="center" align="center" width="110px">{{award.deadline}}</el-descriptions-item>
          <el-descriptions-item label="获奖名额" label-align="center" align="center" width="110px">{{award.number}}</el-descriptions-item>
          <el-descriptions-item label="相关材料" label-align="center" align="center" width="110px" span="2">
            {{award.details}}
          </el-descriptions-item>
        </el-descriptions>
      </div>
    </div>
  </div>
</template>

<script>
import {SelectAwardById} from "../../api/award";
export default {
  name: "AwardCard",
  props:['awardId'],
  data () {
    return {
      value: '',
      awardNumber:10,
      award: {
      },
    }
  },
  methods: {
    loadAward(){
      SelectAwardById(this.awardId).then(response =>{
        this.award = response.data
      })
    },
  },
  created() {
  },
  mounted() {
    this.loadAward()
  },
}
</script>

<style scoped>
.main {
  display: flex;
  flex-direction: column;
}
.body {
  display: flex;
  justify-content: center;
}
.card {
  display: flex;
  border-radius: 10px;
  background-color: #0068c0;
  width: 700px;
  height: 250px;
  margin-bottom: 10px;
}
.card-img {

}
.card-details {
  margin-left: 100px;
  margin-top: 20px;
}
.card-title {
  font-weight: bold;
  font-size: 25px;
  color: white;
}
.card-text {
  margin-top: 15px;
  color: white;
  font-size: 15px;
  margin-right: 10px;
}
.card-money {
  font-size: 20px;
  color: white;
  margin-top: 50px;
}
.card-standard {
  font-size: 15px;
  margin-top: 15px;
}

</style>